{% extends "base.html" %}
{% block bookbar %}
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-bbw&key=ABQIAAAAusPyxGHeghDiniUS2AIf0RS1qcQWvCKIqMD2VH_L3Zd8EcE-9BR5ahqvBIxYonzcWf1fHuJ1riFakQ" type="text/javascript"></script>
<style type="text/css">@import url("http://www.google.com/uds/css/gsearch.css");</style>
  <script type="text/javascript">
    window._uds_bbw_donotrepair = true;
  </script>
  <script src="http://www.google.com/uds/solutions/bookbar/gsbookbar.js?mode=new"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/solutions/bookbar/gsbookbar.css");
  </style>

  <script type="text/javascript">
    function LoadBookBar() {

    var bookBar;
    var options = {
        largeResultSet : !true,
        horizontal : true,
      }

    {% for reading in readings %}
    var barContainer = document.getElementById("{{reading.key}}")
    bookBar = new GSbookBar(barContainer,options);
    bookBar.execute("{{reading.title}}");
    {% endfor %}
    }
    GSearch.setOnLoadCallback(LoadBookBar);
  </script>
{% endblock %}
{% block content %}
<div class="span-14">
<p>{{ user_text }} {{user_link}}</p>
{% if user_text %}
<form action="/save" method="post">
<label for="reading">Qu&eacute; est&aacute;s leyendo?</label>
<br />
<input id="reading" class="title" type="text" value="" name="reading"/>
<input type="hidden" name="ref" value="">
<br />
<input type="submit" value="Grabar"/>
</form>
{% endif %}
<br />
<h3>&Uacute;ltimas Lecturas en Ex Libris</h3>
{% for reading in readings %}
<p><strong>{{reading.user.nickname}}</strong> est&aacute; leyendo <em>{{reading.title}}</em> - <a href="/comments/{{reading.key}}">Comentarios</a> ({{reading.CountComments}})</p>
<div id="{{reading.key}}"><span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span></div>
{% endfor %}
</div>
{% endblock %}
